home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / pm65sdk / sourcecode / includes / oldparameterblock.h < prev    next >
Text File  |  1996-06-14  |  5KB  |  140 lines

  1. /**[f******************************************************************
  2.  * cqparblk.h -    
  3.  *
  4.  * Copyright: ⌐ 1990, 1991 Aldus, Corp., all rights reserved
  5.  *
  6.  * ABSTRACT:  
  7.  *    Contains declarations for Addition Paramter blocks.
  8.  *
  9.  *__________________________________.
  10.  * $Revision:   1.0  $                |
  11.  * $Author:   edmundl  $                |
  12.  * $Date:   14 Jun 1996 14:37:56  $    |
  13.  *                                    |
  14.  ***f]******************************************************************/
  15.  
  16. #ifndef _CQPARBLK
  17. #define _CQPARBLK
  18.  
  19.  
  20.     /*  ----------- Include Files ------------------ */
  21. #if !defined(_ALDTYPES)
  22. #include "oldtypes.h"
  23. #endif
  24. /* This should be replaced.
  25. #if !defined(_ALDUTILS)
  26. #include "aldutils.h"
  27. #endif
  28.  
  29. #if !defined(_CQRSTYLE)
  30. #include "cqrstyle.h"
  31. #endif
  32.  
  33. #if !defined(_CQUNITS)
  34. #include "cqunits.h"
  35. #endif
  36.  
  37. #if !defined(_ALDADDN)
  38. #include "aldaddn.h"
  39. #endif      */
  40.  
  41.  
  42.     /*  ----------- Defines ------------------------ */
  43.     #define ALDUS_VERS            0x0200
  44.  
  45.     /*  ----------- ROM Globals -------------------- */
  46.     /*  ----------- Macro Definitions -------------- */
  47.     /*  ----------- Type Definitions --------------- */
  48.  
  49.     typedef WORD     ADNOPCODE;            // -- oc -- 
  50.     typedef DWORD    ADNPROPERTIES;        // -- apr -- 
  51.     typedef short    BOOL16;                //Boolean types in additions should always be 16bits
  52.                                         //regardless on what platform they run under.    
  53.  
  54.  
  55.     /*  ----------- Macro Definitions -------------- */
  56.  
  57.  
  58.  
  59.         //---------------------------------------------------------
  60.         //    The following are component macros.  They can be used
  61.         //    individually, but are primarily used by the compound
  62.         //    macros at the end of this section.
  63.         //
  64.         //    The following set individual fields in the parameter block:
  65.         //---------------------------------------------------------
  66.     #define PBGetOpCode(lpPB)                ((LPPARAMBLOCK)lpPB)->opCode
  67.     #define PBSetOpCode(lpPB, op)            ((LPPARAMBLOCK)lpPB)->opCode = op
  68.     #define PBGetID(lpPB)                    ((LPPARAMBLOCK)lpPB)->subCode
  69.     #define PBSetID(lpPB,dw)                ((LPPARAMBLOCK)lpPB)->subCode = ((DWORD)dw)
  70.     #define PBGetHPrivate(lpPB)                ((LPPARAMBLOCK)lpPB)->pluginData
  71.     #define PBSetHPrivate(lpPB,h)            ((LPPARAMBLOCK)lpPB)->pluginData = ((HANDLE)h)
  72.     #define PBGetErrMessage(lpPB)            ((LPPARAMBLOCK)lpPB)->errMessage
  73.     #define PBSetErrMessage(lpPB,hMsg)        ((LPPARAMBLOCK)lpPB)->errMessage = ((HANDLE)hMsg)
  74.     
  75.     #define PBGetRequestData(lpPB)            ((LPPARAMBLOCK)lpPB)->requestData
  76.     #define PBSetRequestData(lpPB, lpD)        ((LPPARAMBLOCK)lpPB)->requestData = ((LPVOID)(lpD))
  77.     #define PBGetRequestRefStyle(lpPB)        (WORD)(((LPPARAMBLOCK)lpPB)->requestStyle)
  78.     #define PBSetRequestRefStyle(lpPB,sy)    ((LPPARAMBLOCK)lpPB)->requestStyle = ((WORD)sy)
  79.     #define PBGetRequestDataSize(lpPB)        ((LPPARAMBLOCK)lpPB)->requestSize
  80.     #define PBSetRequestDataSize(lpPB,sz)    ((LPPARAMBLOCK)lpPB)->requestSize = (DWORD)(sz)
  81.     
  82.     #define PBGetReplyData(lpPB)            ((LPPARAMBLOCK)lpPB)->replyData
  83.     #define PBSetReplyData(lpPB, lpD)        ((LPPARAMBLOCK)lpPB)->replyData = ((LPVOID)(lpD))
  84.     #define PBGetReplyRefStyle(lpPB)        (WORD)(((LPPARAMBLOCK)lpPB)->replyStyle)
  85.     #define PBSetReplyRefStyle(lpPB,sy)        ((LPPARAMBLOCK)lpPB)->replyStyle = ((WORD)sy)
  86.     #define PBGetReplyDataSize(lpPB)        ((LPPARAMBLOCK)lpPB)->replySize
  87.     #define PBSetReplyDataSize(lpPB,sz)        ((LPPARAMBLOCK)lpPB)->replySize = (DWORD)(sz)
  88.     
  89.     
  90.     
  91.         //---------------------------------------------------------
  92.         //    The following set the units used for request and 
  93.         //    query reply results for text format commands and queries.
  94.         //    For Binary commands and queries, all measurements are
  95.         //    assumed to be in Twips.  
  96.         //
  97.         //    PageMaker's Twip is 1/20th of a PostScript Point.
  98.         //
  99.         //    Units must be set manually prior to sending any Text
  100.         //    commands or queries.  If you work with only one set of
  101.         //    units, this need only be done once per invocation.
  102.         //---------------------------------------------------------
  103.     #define PBGetRequestUnits(lpPB)            ((LPPARAMBLOCK)lpPB)->requestUnits
  104.     #define PBSetRequestUnits(lpPB, u)        ((LPPARAMBLOCK)lpPB)->requestUnits = (u)
  105.     #define PBGetReplyUnits(lpPB)            ((LPPARAMBLOCK)lpPB)->replyUnits
  106.     #define PBSetReplyUnits(lpPB, u)        ((LPPARAMBLOCK)lpPB)->replyUnits = (u)
  107.  
  108.         //---------------------------------------------------------
  109.         //    This macro calls PageMaker once a Parameter block has 
  110.         //    been properly filled out.  It is performed as part of 
  111.         //    the macros that issue Text and Binary commands and queries 
  112.         //    later in this section.  You will probably not need to use it
  113.         //    directly.
  114.         //---------------------------------------------------------
  115.     #define PBCallback(lpPB)                ((RC)(lpPB->pmCallback(lpPB)))
  116.  
  117.         //---------------------------------------------------------
  118.         //    The following macros set an entire ARGBLOCK in the
  119.         //    PARAMBLOCK.  Currently, fields are automatically cleared
  120.         //    in the Reply Block prior to issuing a Command.
  121.         //
  122.         //    You should not plan on keeping results in the Reply Block
  123.         //    across calls to PageMaker as this will be enforced in
  124.         //    the future.
  125.         //---------------------------------------------------------
  126.     #define PBSetRequestBlock(lpPB,rs,pv,sz)    (void)(PBSetRequestRefStyle(lpPB,rs),     \
  127.                                                     PBSetRequestData(lpPB,pv),            \
  128.                                                     PBSetRequestDataSize(lpPB,sz))
  129.     #define PBClearRequestBlock(lpPB)            PBSetRequestBlock(lpPB,NULL,NULL,NULL)
  130.     
  131.     #define PBSetReplyBlock(lpPB,rs,pv,sz)        (void)(PBSetReplyRefStyle(lpPB,rs),         \
  132.                                                     PBSetReplyData(lpPB,pv),            \
  133.                                                     PBSetReplyDataSize(lpPB,sz))
  134.     #define PBClearReplyBlock(lpPB)                PBSetReplyBlock(lpPB,NULL,NULL,NULL)
  135.  
  136.  
  137.         
  138. #endif //_CQPARAMBLK        
  139.         
  140.